3.565 \(\int \left (c+d x^{-1+n}\right ) \left (a+b x^n\right )^3 \, dx\)

Optimal. Leaf size=84 \[ a^3 c x+\frac{3 a^2 b c x^{n+1}}{n+1}+\frac{3 a b^2 c x^{2 n+1}}{2 n+1}+\frac{d \left (a+b x^n\right )^4}{4 b n}+\frac{b^3 c x^{3 n+1}}{3 n+1} \]

[Out]

a^3*c*x + (3*a^2*b*c*x^(1 + n))/(1 + n) + (3*a*b^2*c*x^(1 + 2*n))/(1 + 2*n) + (b
^3*c*x^(1 + 3*n))/(1 + 3*n) + (d*(a + b*x^n)^4)/(4*b*n)

_______________________________________________________________________________________

Rubi [A]  time = 0.110754, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158 \[ a^3 c x+\frac{3 a^2 b c x^{n+1}}{n+1}+\frac{3 a b^2 c x^{2 n+1}}{2 n+1}+\frac{d \left (a+b x^n\right )^4}{4 b n}+\frac{b^3 c x^{3 n+1}}{3 n+1} \]

Antiderivative was successfully verified.

[In]  Int[(c + d*x^(-1 + n))*(a + b*x^n)^3,x]

[Out]

a^3*c*x + (3*a^2*b*c*x^(1 + n))/(1 + n) + (3*a*b^2*c*x^(1 + 2*n))/(1 + 2*n) + (b
^3*c*x^(1 + 3*n))/(1 + 3*n) + (d*(a + b*x^n)^4)/(4*b*n)

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{3 a^{2} b c x^{n + 1}}{n + 1} + \frac{3 a b^{2} c x^{2 n + 1}}{2 n + 1} + \frac{b^{3} c x^{3 n + 1}}{3 n + 1} + c \int a^{3}\, dx + \frac{d \left (a + b x^{n}\right )^{4}}{4 b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c+d*x**(-1+n))*(a+b*x**n)**3,x)

[Out]

3*a**2*b*c*x**(n + 1)/(n + 1) + 3*a*b**2*c*x**(2*n + 1)/(2*n + 1) + b**3*c*x**(3
*n + 1)/(3*n + 1) + c*Integral(a**3, x) + d*(a + b*x**n)**4/(4*b*n)

_______________________________________________________________________________________

Mathematica [A]  time = 0.185538, size = 162, normalized size = 1.93 \[ \frac{4 a^3 \left (6 n^3+11 n^2+6 n+1\right ) \left (c n x+d x^n\right )+6 a^2 b \left (6 n^2+5 n+1\right ) x^n \left (2 c n x+d (n+1) x^n\right )+4 a b^2 \left (3 n^2+4 n+1\right ) x^{2 n} \left (3 c n x+d (2 n+1) x^n\right )+b^3 \left (2 n^2+3 n+1\right ) x^{3 n} \left (4 c n x+d (3 n+1) x^n\right )}{4 n (n+1) (2 n+1) (3 n+1)} \]

Antiderivative was successfully verified.

[In]  Integrate[(c + d*x^(-1 + n))*(a + b*x^n)^3,x]

[Out]

(4*a^3*(1 + 6*n + 11*n^2 + 6*n^3)*(c*n*x + d*x^n) + 6*a^2*b*(1 + 5*n + 6*n^2)*x^
n*(2*c*n*x + d*(1 + n)*x^n) + 4*a*b^2*(1 + 4*n + 3*n^2)*x^(2*n)*(3*c*n*x + d*(1
+ 2*n)*x^n) + b^3*(1 + 3*n + 2*n^2)*x^(3*n)*(4*c*n*x + d*(1 + 3*n)*x^n))/(4*n*(1
 + n)*(1 + 2*n)*(1 + 3*n))

_______________________________________________________________________________________

Maple [A]  time = 0.029, size = 130, normalized size = 1.6 \[{a}^{3}cx+{\frac{{a}^{3}d{{\rm e}^{n\ln \left ( x \right ) }}}{n}}+{\frac{a{b}^{2}d \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{3}}{n}}+{\frac{{b}^{3}cx \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{3}}{1+3\,n}}+{\frac{{b}^{3}d \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{4}}{4\,n}}+{\frac{3\,{a}^{2}bd \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{2\,n}}+3\,{\frac{ac{b}^{2}x \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{1+2\,n}}+3\,{\frac{{a}^{2}bcx{{\rm e}^{n\ln \left ( x \right ) }}}{1+n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c+d*x^(-1+n))*(a+b*x^n)^3,x)

[Out]

a^3*c*x+a^3*d/n*exp(n*ln(x))+a*b^2*d/n*exp(n*ln(x))^3+b^3*c/(1+3*n)*x*exp(n*ln(x
))^3+1/4*b^3*d/n*exp(n*ln(x))^4+3/2*a^2*b*d/n*exp(n*ln(x))^2+3*a*c*b^2/(1+2*n)*x
*exp(n*ln(x))^2+3*a^2*b*c/(1+n)*x*exp(n*ln(x))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^(n - 1) + c)*(b*x^n + a)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.227749, size = 412, normalized size = 4.9 \[ \frac{4 \,{\left (6 \, a^{3} c n^{4} + 11 \, a^{3} c n^{3} + 6 \, a^{3} c n^{2} + a^{3} c n\right )} x +{\left (6 \, b^{3} d n^{3} + 11 \, b^{3} d n^{2} + 6 \, b^{3} d n + b^{3} d\right )} x^{4 \, n} + 4 \,{\left (6 \, a b^{2} d n^{3} + 11 \, a b^{2} d n^{2} + 6 \, a b^{2} d n + a b^{2} d +{\left (2 \, b^{3} c n^{3} + 3 \, b^{3} c n^{2} + b^{3} c n\right )} x\right )} x^{3 \, n} + 6 \,{\left (6 \, a^{2} b d n^{3} + 11 \, a^{2} b d n^{2} + 6 \, a^{2} b d n + a^{2} b d + 2 \,{\left (3 \, a b^{2} c n^{3} + 4 \, a b^{2} c n^{2} + a b^{2} c n\right )} x\right )} x^{2 \, n} + 4 \,{\left (6 \, a^{3} d n^{3} + 11 \, a^{3} d n^{2} + 6 \, a^{3} d n + a^{3} d + 3 \,{\left (6 \, a^{2} b c n^{3} + 5 \, a^{2} b c n^{2} + a^{2} b c n\right )} x\right )} x^{n}}{4 \,{\left (6 \, n^{4} + 11 \, n^{3} + 6 \, n^{2} + n\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^(n - 1) + c)*(b*x^n + a)^3,x, algorithm="fricas")

[Out]

1/4*(4*(6*a^3*c*n^4 + 11*a^3*c*n^3 + 6*a^3*c*n^2 + a^3*c*n)*x + (6*b^3*d*n^3 + 1
1*b^3*d*n^2 + 6*b^3*d*n + b^3*d)*x^(4*n) + 4*(6*a*b^2*d*n^3 + 11*a*b^2*d*n^2 + 6
*a*b^2*d*n + a*b^2*d + (2*b^3*c*n^3 + 3*b^3*c*n^2 + b^3*c*n)*x)*x^(3*n) + 6*(6*a
^2*b*d*n^3 + 11*a^2*b*d*n^2 + 6*a^2*b*d*n + a^2*b*d + 2*(3*a*b^2*c*n^3 + 4*a*b^2
*c*n^2 + a*b^2*c*n)*x)*x^(2*n) + 4*(6*a^3*d*n^3 + 11*a^3*d*n^2 + 6*a^3*d*n + a^3
*d + 3*(6*a^2*b*c*n^3 + 5*a^2*b*c*n^2 + a^2*b*c*n)*x)*x^n)/(6*n^4 + 11*n^3 + 6*n
^2 + n)

_______________________________________________________________________________________

Sympy [A]  time = 10.984, size = 1251, normalized size = 14.89 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c+d*x**(-1+n))*(a+b*x**n)**3,x)

[Out]

Piecewise((a**3*c*x - a**3*d/x + 3*a**2*b*c*log(x) - 3*a**2*b*d/(2*x**2) - 3*a*b
**2*c/x - a*b**2*d/x**3 - b**3*c/(2*x**2) - b**3*d/(4*x**4), Eq(n, -1)), (a**3*c
*x - 2*a**3*d/sqrt(x) + 6*a**2*b*c*sqrt(x) - 3*a**2*b*d/x + 3*a*b**2*c*log(x) -
2*a*b**2*d/x**(3/2) - 2*b**3*c/sqrt(x) - b**3*d/(2*x**2), Eq(n, -1/2)), (a**3*c*
x - 3*a**3*d/x**(1/3) + 9*a**2*b*c*x**(2/3)/2 - 9*a**2*b*d/(2*x**(2/3)) + 9*a*b*
*2*c*x**(1/3) - 3*a*b**2*d/x + b**3*c*log(x) - 3*b**3*d/(4*x**(4/3)), Eq(n, -1/3
)), ((a + b)**3*(c*x + d*log(x)), Eq(n, 0)), (24*a**3*c*n**4*x/(24*n**4 + 44*n**
3 + 24*n**2 + 4*n) + 44*a**3*c*n**3*x/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 24*a
**3*c*n**2*x/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 4*a**3*c*n*x/(24*n**4 + 44*n*
*3 + 24*n**2 + 4*n) + 24*a**3*d*n**3*x**n/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) +
44*a**3*d*n**2*x**n/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 24*a**3*d*n*x**n/(24*n
**4 + 44*n**3 + 24*n**2 + 4*n) + 4*a**3*d*x**n/(24*n**4 + 44*n**3 + 24*n**2 + 4*
n) + 72*a**2*b*c*n**3*x*x**n/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 60*a**2*b*c*n
**2*x*x**n/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 12*a**2*b*c*n*x*x**n/(24*n**4 +
 44*n**3 + 24*n**2 + 4*n) + 36*a**2*b*d*n**3*x**(2*n)/(24*n**4 + 44*n**3 + 24*n*
*2 + 4*n) + 66*a**2*b*d*n**2*x**(2*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 36*a
**2*b*d*n*x**(2*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 6*a**2*b*d*x**(2*n)/(24
*n**4 + 44*n**3 + 24*n**2 + 4*n) + 36*a*b**2*c*n**3*x*x**(2*n)/(24*n**4 + 44*n**
3 + 24*n**2 + 4*n) + 48*a*b**2*c*n**2*x*x**(2*n)/(24*n**4 + 44*n**3 + 24*n**2 +
4*n) + 12*a*b**2*c*n*x*x**(2*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 24*a*b**2*
d*n**3*x**(3*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 44*a*b**2*d*n**2*x**(3*n)/
(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 24*a*b**2*d*n*x**(3*n)/(24*n**4 + 44*n**3
+ 24*n**2 + 4*n) + 4*a*b**2*d*x**(3*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 8*b
**3*c*n**3*x*x**(3*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 12*b**3*c*n**2*x*x**
(3*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 4*b**3*c*n*x*x**(3*n)/(24*n**4 + 44*
n**3 + 24*n**2 + 4*n) + 6*b**3*d*n**3*x**(4*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*
n) + 11*b**3*d*n**2*x**(4*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + 6*b**3*d*n*x*
*(4*n)/(24*n**4 + 44*n**3 + 24*n**2 + 4*n) + b**3*d*x**(4*n)/(24*n**4 + 44*n**3
+ 24*n**2 + 4*n), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.226922, size = 572, normalized size = 6.81 \[ \frac{24 \, a^{3} c n^{4} x + 8 \, b^{3} c n^{3} x e^{\left (3 \, n{\rm ln}\left (x\right )\right )} + 36 \, a b^{2} c n^{3} x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 72 \, a^{2} b c n^{3} x e^{\left (n{\rm ln}\left (x\right )\right )} + 44 \, a^{3} c n^{3} x + 6 \, b^{3} d n^{3} e^{\left (4 \, n{\rm ln}\left (x\right )\right )} + 24 \, a b^{2} d n^{3} e^{\left (3 \, n{\rm ln}\left (x\right )\right )} + 12 \, b^{3} c n^{2} x e^{\left (3 \, n{\rm ln}\left (x\right )\right )} + 36 \, a^{2} b d n^{3} e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 48 \, a b^{2} c n^{2} x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 24 \, a^{3} d n^{3} e^{\left (n{\rm ln}\left (x\right )\right )} + 60 \, a^{2} b c n^{2} x e^{\left (n{\rm ln}\left (x\right )\right )} + 24 \, a^{3} c n^{2} x + 11 \, b^{3} d n^{2} e^{\left (4 \, n{\rm ln}\left (x\right )\right )} + 44 \, a b^{2} d n^{2} e^{\left (3 \, n{\rm ln}\left (x\right )\right )} + 4 \, b^{3} c n x e^{\left (3 \, n{\rm ln}\left (x\right )\right )} + 66 \, a^{2} b d n^{2} e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 12 \, a b^{2} c n x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 44 \, a^{3} d n^{2} e^{\left (n{\rm ln}\left (x\right )\right )} + 12 \, a^{2} b c n x e^{\left (n{\rm ln}\left (x\right )\right )} + 4 \, a^{3} c n x + 6 \, b^{3} d n e^{\left (4 \, n{\rm ln}\left (x\right )\right )} + 24 \, a b^{2} d n e^{\left (3 \, n{\rm ln}\left (x\right )\right )} + 36 \, a^{2} b d n e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 24 \, a^{3} d n e^{\left (n{\rm ln}\left (x\right )\right )} + b^{3} d e^{\left (4 \, n{\rm ln}\left (x\right )\right )} + 4 \, a b^{2} d e^{\left (3 \, n{\rm ln}\left (x\right )\right )} + 6 \, a^{2} b d e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 4 \, a^{3} d e^{\left (n{\rm ln}\left (x\right )\right )}}{4 \,{\left (6 \, n^{4} + 11 \, n^{3} + 6 \, n^{2} + n\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^(n - 1) + c)*(b*x^n + a)^3,x, algorithm="giac")

[Out]

1/4*(24*a^3*c*n^4*x + 8*b^3*c*n^3*x*e^(3*n*ln(x)) + 36*a*b^2*c*n^3*x*e^(2*n*ln(x
)) + 72*a^2*b*c*n^3*x*e^(n*ln(x)) + 44*a^3*c*n^3*x + 6*b^3*d*n^3*e^(4*n*ln(x)) +
 24*a*b^2*d*n^3*e^(3*n*ln(x)) + 12*b^3*c*n^2*x*e^(3*n*ln(x)) + 36*a^2*b*d*n^3*e^
(2*n*ln(x)) + 48*a*b^2*c*n^2*x*e^(2*n*ln(x)) + 24*a^3*d*n^3*e^(n*ln(x)) + 60*a^2
*b*c*n^2*x*e^(n*ln(x)) + 24*a^3*c*n^2*x + 11*b^3*d*n^2*e^(4*n*ln(x)) + 44*a*b^2*
d*n^2*e^(3*n*ln(x)) + 4*b^3*c*n*x*e^(3*n*ln(x)) + 66*a^2*b*d*n^2*e^(2*n*ln(x)) +
 12*a*b^2*c*n*x*e^(2*n*ln(x)) + 44*a^3*d*n^2*e^(n*ln(x)) + 12*a^2*b*c*n*x*e^(n*l
n(x)) + 4*a^3*c*n*x + 6*b^3*d*n*e^(4*n*ln(x)) + 24*a*b^2*d*n*e^(3*n*ln(x)) + 36*
a^2*b*d*n*e^(2*n*ln(x)) + 24*a^3*d*n*e^(n*ln(x)) + b^3*d*e^(4*n*ln(x)) + 4*a*b^2
*d*e^(3*n*ln(x)) + 6*a^2*b*d*e^(2*n*ln(x)) + 4*a^3*d*e^(n*ln(x)))/(6*n^4 + 11*n^
3 + 6*n^2 + n)